﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using NutriLeaf.Web.Model;

namespace NutriLeaf.Services.Core.Article
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IArticles" in both code and config file together.
    [ServiceContract]
    public interface IArticleService
    {
        [OperationContract]
        void InsertArticle(NutriLeaf.Web.Model.Article article);
        [OperationContract]
        void InsertArticleByDetails(string articleTitle, string articleDescription, string articleText, int userId, int categoryId, bool IsApproved);
        [OperationContract]
        void ApproveArticleById(int articleId);
        [OperationContract]
        void ApproveArticle(NutriLeaf.Web.Model.Article article);
        [OperationContract]
        bool IsApproved(int articleId);
        [OperationContract]
        void UpdateArticle(NutriLeaf.Web.Model.Article article);
        [OperationContract]
         List<NutriLeaf.Web.Model.Article> GetArticlesWrittenByUser(int userId);
        [OperationContract]
        List<NutriLeaf.Web.Model.Article> GetArticlesByCategory(ArticleCategory category);
        [OperationContract]
        List<NutriLeaf.Web.Model.Article> GetArticleByCategoryById(int categoryId);
        [OperationContract]
        void InsertCategoryByCategory(ArticleCategory category);
        [OperationContract]
        void InsertCategory(string categoryName, string categoryDescription, int ParentCategoryID);
        [OperationContract]
        void RemoveCategoryById(int categoryId);
        [OperationContract]
        void RemoveCategory(ArticleCategory category);
        [OperationContract]
        void UpdateCateogory(ArticleCategory category);
        [OperationContract]
         void LikeArticleById(int articleId, int userId, bool like);
        [OperationContract]
         void LikeArticle(NutriLeaf.Web.Model.Article article, User user, bool like);
        [OperationContract]
        void RemoveArticleLikeById(int likeId);
        [OperationContract]
        void RemoveArticleLike(ArticleLike like);
        [OperationContract]
        List<NutriLeaf.Web.Model.Article> GetArticlesLikedByUser(int userId);
        [OperationContract]
        List<NutriLeaf.Web.Model.Article> GetMostPopularArticles(int count);
      
       
        
    }
}
